#ifndef _FETCOPY_H_
#define _FETCOPY_H_

#include "../fpdfemb.h"

#ifdef __cplusplus
extern "C" {
#endif

/** 
 *Start a select
 *
 * @param[in] page			Page handle. The page has to be parsed first.
 * @param[in] nStart		Select the start of the index.
 * @param[in] nEnd			Select the end of the index
 * @param[in] startx			Left pixel position of the display area in the device coordination
 * @param[in] starty			Top pixel position of the display area in the device coordination
 * @param[in] width			Horizontal size (in pixels) for displaying the page
 * @param[in] height		Vertical size (in pixels) for displaying the page
 * @param[in] rotate			Page orientation: 0 (normal), 1 (rotated 90 degrees clockwise),
 *								2 (rotated 180 degrees), 3 (rotated 90 degrees counter-clockwise).
 *	@return	See the define FPDFERR_xxx
 */
FPDFEMB_RESULT FPDFEMB_SelectText(FPDFEMB_PAGE page, int nStart, int nEnd,
		int startx, int start_y, int width, int height, int rotate);

/**
 *Get number of rectangles for selected.
 *
 * @param[out] counts		Receiving the Number of rectangles for selected. 0 for failure.
 * @return	See the define FPDFERR_xxx
 */
FPDFEMB_RESULT FPDFEMB_CountSelectedRects(int* counts);

/**
 *Get number of rectangles, then use this function to get each rectangle.
 *
 * @param[in] index			Zero-based index for the rectangle.
 * @param[out] rect			Receiving the result rectangle
 * @return	See the define FPDFERR_xxx
 */
FPDFEMB_RESULT FPDFEMB_GetSelectedRect(int index, struct FPDFEMB_RECT *rect);

/**
 *End select and empty the temporary data.
 *When you end the SelectText
 *or starting a new SelectText before you must call this function
 */
void FPDFEMB_SelectTextDestroy();

#ifdef __cplusplus
};
#endif
#endif //_FETCOPY_H_
